From: Roan Kattouw Date: Mon, 7 Feb 2011 21:55:11 +0000 (+0000) Subject: Followup r81491: use $.client correctly X-Git-Tag: 1.31.0-rc.0~32135 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=0b24c2929499f136a04a232a4714688977aa6e26;p=lhc%2Fweb%2Fwiklou.git Followup r81491: use $.client correctly --- diff --git a/resources/jquery/jquery.textSelection.js b/resources/jquery/jquery.textSelection.js index 3207d981f4..6faeab8b31 100644 --- a/resources/jquery/jquery.textSelection.js +++ b/resources/jquery/jquery.textSelection.js @@ -261,7 +261,7 @@ setSelection: function( options ) { */ scrollToCaretPosition: function( options ) { function getLineLength( e ) { - return Math.floor( e.scrollWidth / ( $.client.platform == 'linux' ? 7 : 8 ) ); + return Math.floor( e.scrollWidth / ( $.client.profile().platform == 'linux' ? 7 : 8 ) ); } function getCaretScrollPosition( e ) { // FIXME: This functions sucks and is off by a few lines most @@ -304,7 +304,7 @@ scrollToCaretPosition: function( options ) { charInLine = caret - lastSpaceInLine; row++; } - return ( $.client.platform == 'mac' ? 13 : ( $.client.platform == 'linux' ? 15 : 16 ) ) * row; + return ( $.client.profile().platform == 'mac' ? 13 : ( $.client.profile().platform == 'linux' ? 15 : 16 ) ) * row; } return this.each(function() { if ( $(this).is( ':hidden' ) ) { @@ -400,4 +400,4 @@ scrollToCaretPosition: function( options ) { } return retval; }; -} )( jQuery ); \ No newline at end of file +} )( jQuery );